package com.hehe;

import com.hehe.factory.LoginStrategyFactory;
import com.hehe.powernode.constant.AuthConstants;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

@SpringBootApplication
@Slf4j
@EnableDiscoveryClient
public class AuthServerApplication implements ApplicationRunner {
    @Value("${text2:#{null}}")
    private String text2;
    @Autowired
    private LoginStrategyFactory strategyFactory;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("Allow URLs: text2"+text2);
        log.info("Allow URLs: text2"+strategyFactory.getInstance(AuthConstants.MEMBER_LOGIN));

    }
    public static void main(String[] args) {
        SpringApplication.run(AuthServerApplication.class,args);
    }
}